package CSISL4pk;

public class Address
{

    private String street, apt, city, state;
    private int zip;
    private boolean isBusiness;

    // no-argument constructor
    public Address()
    {
    }

    // street methods
    public String getStreet()
    {
        return street;
    }

    public void setStreet(String street)
    {
        this.street = street;
    }

    // apartment methods
    public String getApt()
    {
        return apt;
    }

    public void setApt(String apt)
    {
        this.apt = apt;
    }

    // city methods
    public String getCity()
    {
        return city;
    }

    public void setCity(String city)
    {
        this.city = city;
    }

    // state methods
    public String getState()
    {
        return state;
    }

    public void setState(String state)
    {
        this.state = state;
    }

    // zip methods
    public int getZip()
    {
        return zip;
    }

    public void setZip(int zip)
    {
        this.zip = zip;
    }

    // business methods
    public boolean getBusiness()
    {
        return isBusiness;
    }

    public void setBusiness(boolean business)
    {
        this.isBusiness = business;
    }

    @Override
    public String toString()
    {
        String type;
        if (isBusiness)
        {
            type = "BUS";
        } else
        {
            type = "RES";
        }

        return street + " apt " + apt
                + city + ", " + state + " " + zip
                + "\nBusiness/Residence: " + type;
    }
}